package com.manda.smart.hub.expression.definition;

import java.lang.reflect.Method;

/**
 * @author hongda.li
 */
public record MethodMeta(Object target, Method method) {

    public Invocation toInvocation(Object[] args) {
        return new Invocation()
                .setArgs(args)
                .setTarget(target)
                .setMethod(method)
                .setTargetType(target.getClass());
    }
}
